<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .app{
      width: 600px;
      height: 400px;
      position: absolute;
      left: 50%;
      top: 50%;
      margin-top: -200px;
      margin-left: -300px;
      transform: rotate(90deg);
      transform-origin: (50% 50%);
    }
    .wrap{
      width: 100%;
      height: 100%;
    }
    #canvas{
      width: 100%;
      height: 100%;
      background-color: #333;
    }
  </style>
</head>
<body>
  <div class="app">
    <div class="wrap">
      <canvas id="canvas"></canvas>
    </div>
  </div>
  <script>
    let canvas = document.querySelector("#canvas");
    let ctx = canvas.getContext("2d");
    ctx.beginPath();
    ctx.moveTo(0,0)
    ctx.lineTo(100,100);
    ctx.fillStyle = 'white';
    ctx.stroke()
  </script>
</body>
</html>